package com.sq.partner.manager.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.FacadeAppInsured;

/**
 * 被保人Dao接口
 * @author zhouxiuxiu
 *
 */
public interface FacadeAppInsuredDao extends BaseDao {

    /**
     * 添加被保险人
     * @param param
     * @throws Exception
     */
    public void insertFacadeAppInsured(FacadeAppInsured param) throws Exception;

    /**
     * 得到一个新的被保人ID
     * 
     * @return
     * @throws SQLException
     */
    public String queryNewClientNo() throws SQLException;
    
    /**
     * 修改被保险人
     * @param facadeAppInsured
     * @throws Exception
     */
    public void updateAppInsuredNotNull(FacadeAppInsured facadeAppInsured)
            throws Exception;
    
    /**
     * 查询被保险人
     * @param map
     * @return FacadeAppInsured
     * @throws Exception
     */
    public FacadeAppInsured selectFacadeAppInsuredByMap(Map<String, String> map)
        throws Exception;
    
    /**
     * 查询被保险人
     * @param map
     * @return FacadeAppInsured
     * @throws Exception
     */
    public List<FacadeAppInsured> selectFacadeAppInsuredList(
            Map<String, String> map) throws SQLException;
    
    /**
     * 删除被保险人
     * @param appNo
     * @throws Exception
     */
    public void deleteInsuredByAppNo(String appNo) throws Exception;
}
